package org.example.backend.Module.System.Role.Service.Impl;

import org.example.backend.Module.System.Role.Mapper.RoleMapper;
import org.example.backend.Module.System.Role.Pojo.Entity.Role;
import org.example.backend.Module.System.Role.Service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class RoleServiceImpl implements RoleService {

    @Resource
    private RoleMapper roleMapper;

    @Override
    public Role getRole(Integer id) {
        return id != null ? this.roleMapper.selectById(id) : null;
    }
}
